﻿using Microsoft.EntityFrameworkCore;

namespace EasyDDD.Infrastructure.EFCore.CAP.PostgreSql
{
    public static class PostgreSqlDbContextOptionsBuilderExtensions
    {
        public static DbContextOptionsBuilder UsePgSql(this DbContextOptionsBuilder optionsBuilder, string? connectionString)
        {
            return optionsBuilder.UseNpgsql(connectionString ?? throw new ArgumentNullException("PgSql连接字符串为空"));
        }
    }
}
